package com.ming.test.page;

public class Overloading {
    public String getInfo(String info){
        System.out.println("调用了String类型方法");
        return info;
    }
    public int getInfo(int info){
        System.out.println("调用了int类型方法");
        return info;
    }

    public static void main(String[] ages){
        Overloading overloading = new Overloading();
        String info = overloading.getInfo("名字");
        int info1 = overloading.getInfo(18);
        System.out.println(info);
        System.out.println(info1);
    }
}